@import url("https://fonts.googleapis.com/css?family=Rubik:400,700&display=swap");

*,
*::after,
*::before {
    margin: 0;
    padding: 0;
    box-sizing: inherit;
}

html {
    font-size: 48.5%;
}

body {
    font-family: 'Rubik', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    padding: 3rem;
    box-sizing: border-box;
}

.grids {
    max-width: 136rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column-gap: 3rem;
    grid-row-gap: 3rem;
}

.card-one {
    grid-column: 1/4;
}

.card-two {
    grid-column: 1/4;
}

.card-three {
    grid-column: 1/4;
}

.card-four {
    grid-column: 1/4;
}

.card-five {
    grid-column: 1/4;
}

.card-six {
    grid-column: 1/4;
}


.card {
    perspective: 150rem;
    -moz-perspective: 150rem;
    position: relative;
    height: 25rem;
    width: 100%;
    transition: all ease-in-out 400ms;
    cursor: pointer;
}

.card:hover {
    transform: scale(1.05);
}

.card:active {
    transform: translateY(-1px);
}

.card__side {
    transition: all .8s ease;
    color: white;
    font-size: 2rem;
    position: absolute;
    top: 0;
    left: 0;
    height: 25rem;
    width: 100%;
    backface-visibility: hidden;
    box-shadow: 2px 4px 16px rgba(0, 0, 0, 0.4);
    border-radius: 8px;
}

.card__side--front {
    background-color: #2196F3;
    position: relative;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.card__side--back {
    background-color: #303F9F;
    transform: rotateY(180deg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.showGreen {
    transform: rotateY(-180deg);
}

.showRed {
    transform: rotateY(0);
}

.text-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.text-box-top {
    font-size: 2.2rem;
    text-shadow: 2px 2px 10px #0000006c;
    font-weight: 400;
}

.text-box-middle {
    font-size: 5.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 10px #0000006c;
}

.text-box-lower {
    font-size: 2rem;
    text-shadow: 2px 2px 10px #0000006c;
    font-weight: 400;
}

.heading {
    transition: all 0.6s linear;
}

.hide {
    visibility: hidden;
    opacity: 0;
}

.show {
    visibility: visible;
    opacity: 1;
}

#front-1 {
    background-image:url(../images/bankcardcenter_img/1.jpg);
}

#front-2 {
    background-image:url(../images/bankcardcenter_img/2.jpg);
}

#front-3 {
    background-image:url(../images/bankcardcenter_img/3.jpg);
}

#front-4 {
    background-image:url(../images/bankcardcenter_img/4.jpg);
}

#front-5 {
    background-image:url(../images/bankcardcenter_img/5.jpg);
}

/* Back */

#back-1 {
    background-image: url(../images/bankcardcenter_img/1.jpg);
}

#back-2 {
    background-image:url(../images/bankcardcenter_img/2.jpg);
}

#back-3 {
    background-image:url(../images/bankcardcenter_img/3.jpg);
}

#back-4 {
    background-image:url(../images/bankcardcenter_img/4.jpg);
}

#back-5 {
    background-image:url(../images/bankcardcenter_img/5.jpg);
}

@media screen and (min-width: 1024px) {
    html {
        font-size: 62.5%;
    }

    .grids {
        max-width: 136rem;
        margin: 0 auto;
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        grid-column-gap: 3rem;
        grid-row-gap: 3rem;
    }

    .card-one {
        grid-column: 1/3;
    }

    .card-two {
        grid-column: 3/4;
    }

    .card-three {
        grid-column: 1/2;
    }

    .card-four {
        grid-column: 2/2;
    }

    .card-five {
        grid-column: 3/4;
    }

    .card-six {
        grid-column: 1/2;
    }
}
